<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/10/10 0010
 * Time: 下午 4:57
 */
namespace app\admin\controller;
use app\admin\model\Compose;
use app\admin\model\Member;
use think\Controller;

class Admin extends Base {
    #个人中心渲染
    public function index(){
        return $this->fetch('./public/admin/index.html');
    }
    #账号设置
    public function accountSet(){
        return $this->fetch('./public/admin/accountSet.html');
    }
    #添加文章
    public function insert(){
        $mo_cp = new Compose();
        $list =$mo_cp->_list();

        $this->assign([
            'write' => $list,
        ]);
        return $this->fetch('./public/admin/insert.html');
    }
    #修改文章
    public function articleUpdate(){
        $mo_cp = new Compose();
        $list =$mo_cp->_list();

        $this->assign([
            'write' => $list,
        ]);
        return $this->fetch('./public/admin/articleUpdate.html');
    }
    #文章列表
    public function articleList(){
        $mo_cp = new Compose();
        $list =$mo_cp->_list();
        $this->assign([
            'write' => $list,
        ]);
        return $this->fetch('./public/admin/articleList.html');
    }
    #我的文章列表
    public function myArticleList(){
        $mo_cp = new Compose();
        $list =$mo_cp->_list();

        $this->assign([
            'write' => $list,
        ]);
        return $this->fetch('./public/admin/myArticleList.html');
    }

    #评论列表
    public function commentList(){
        return $this->fetch('./public/admin/commentList.html');
    }
    #我发表的评论列表
    public function myCommentList(){
        return $this->fetch('./public/admin/myCommentList.html');
    }
    #我的文章评论列表
    public function otherCommentList(){
        return $this->fetch('./public/admin/otherCommentList.html');
    }

    #用户列表
    public function memberList(){
        $role_m = new Member();
        $role = $role_m->_role();

        $this->assign([
            'role'=>$role,
        ]);
        return $this->fetch('./public/admin/memberList.html');
    }

    #角色列表
    public function roleList(){
        return $this->fetch('./public/admin/roleList.html');
    }

    #权限列表
    public function authList(){
        return $this->fetch('./public/admin/authList.html');
    }

    #系统设置
    public function systemSet(){
        return $this->fetch('./public/admin/system.html');
    }
    #友情链接
    public function linklist(){
        return $this->fetch('./public/admin/linkList.html');
    }
}